package top.lishuoboy.cloud.consumer.order80.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import top.lishuoboy.cloud.api.common.entry.CommonResult;
import top.lishuoboy.cloud.api.common.entry.Payment;

@Service
@FeignClient("cloud-payment-service")  // 大小写敏感
public interface PaymentFeignService {
    @GetMapping(value = "provider/payment/get/{id}")
    CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);

    @GetMapping("provider/payment/hystrix/ok")
    String paymentInfoOK();

    @GetMapping("provider/payment/hystrix/timeout")
    String paymentInfoTimeOut();
}
